//
// Created by Administrator on 2022/1/7.
//
#include "stdio.h"

# define COLOR_RED 0xFF0000

int main() {
    // const <type> readonly variable
    //只读变量
    const int kRed = 0xFF0000;
    const int kGreen = 0x00FF00;
    const int kBlue = 0x0000FF;

    printf("%#x\n", kRed);

    int *p_k_red = &kRed;
    *p_k_red = 0;

    printf("%#x\n", kRed);
    printf("%#x\n", kGreen);
    printf("%#x\n", kBlue);
    //#undef COLOR_RED //解除宏变量
    printf("COLOR_RED:%#x\n", COLOR_RED);
    //真正的常量是字面量:literal   3;3u;3l;3.f;3.9;'c';"cs",L'中国',L"中国";恒定不变的量
    //硬编码 hard code
    //尽量不要直接把字面量直接赋值
    int background_color=COLOR_RED;
    return 0;
}